﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TTControls;
using BindingNavigatorSample.Entities;

namespace BindingNavigatorSample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            BindingList<Car> cars = new BindingList<Car>();  // we use BindingList because it already implements IBindingList which we need to be able to add items to it
            cars.Add(new Car { Make = "Honda", Model = "Civic", ProductionDate = new DateTime(2009, 1, 6) });
            cars.Add(new Car { Make = "Suzuki", Model = "Swift", ProductionDate = new DateTime(2002, 4, 8) });
            cars.Add(new Car { Make = "Dodge", Model = "Viper", ProductionDate = new DateTime(2001, 7, 3) });
            ttBindingNavigator1.DataSource = cars;
            dataGridView1.DataSource = cars;
        }
    }
}
